<!--
  盛付通： 【签约开通】 页面内容

  @author terrfly
  @site https://www.jeequan.com
  @date 2022/11/03 08:35
-->
<template>
  <div v-if="vdata.state == '1'">
    <a-result title="暂无更多操作">
      <template #icon>
        <smile-twoTone />
      </template>
    </a-result>
  </div>
  <div v-else>
    <NextBizsCommonPage ref="nextBizsCommonPage" />
  </div>
</template>

<script lang="ts" setup>

import { ref, reactive, nextTick } from 'vue'
import { API_URL_MCH_APPLYMENT_LIST, req } from '@/api/manage'
import NextBizsCommonPage from '../../commons/NextBizsCommonPage.vue'

const vdata : any = reactive({
  currentStep: 1,
  state: '',
  recordId: null, // 更新对象ID
})

const nextBizsCommonPage = ref()

// 对外暴露的 页面渲染函数  也用作初始化
function pageRender (applyId){
  req.getById(API_URL_MCH_APPLYMENT_LIST, applyId, {}).then( (res) => {
    // 状态
    vdata.state = res.state
    
    if (vdata.state != '1') {
      nextTick(() => {
        nextBizsCommonPage.value.pageRender(applyId) // 直接调用通用组件
      })
    }
  })
}

defineExpose({ pageRender })
</script>